<html>
<head><meta charset="utf-8"><title>Available syntax · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html">Available syntax</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="231665560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231665560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231665560">(Mar 24 2021 at 16:33)</a>:</h4>
<p>Related to the discussion of "raw keywords", it seems useful to note some areas where our lexing allows for compatible extension without an edition boundary.</p>



<a name="231666103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231666103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231666103">(Mar 24 2021 at 16:36)</a>:</h4>
<p>A few that we've talked about:<br>
<code>r#</code> followed by any token other than an identifier or <code>"</code> or <code>#</code><br>
<code>r##</code> (with two or more #) followed by any token other than <code>"</code> or <code>#</code><br>
<code>br#</code> (with one or more #) followed by any token other than <code>"</code> or <code>#</code></p>



<a name="231666420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231666420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231666420">(Mar 24 2021 at 16:38)</a>:</h4>
<p>I'm wondering, given existing attribute syntax, is <code>#</code> alone followed by anything other than <code>!</code> or <code>[</code> available?</p>



<a name="231666798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231666798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231666798">(Mar 24 2021 at 16:40)</a>:</h4>
<p>no, <code>#</code> tokenizes alone -- here's a <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=40ed4402b617551d5f080add005126f1">playground</a> to experiment with.</p>



<a name="231666962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231666962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231666962">(Mar 24 2021 at 16:41)</a>:</h4>
<p>Ah, thank you. Didn't realize that was valid.</p>



<a name="231667100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231667100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231667100">(Mar 24 2021 at 16:42)</a>:</h4>
<p>And similarly, <code>#!foo</code> is not available.</p>



<a name="231667285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231667285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231667285">(Mar 24 2021 at 16:43)</a>:</h4>
<p>notice that you can also define a macro with spaced tokens like <code>( r # $x:ident )</code>, and use it with <code>foo!( r # foo )</code>, but the use doesn't work with mashed tokens <code>r#foo</code></p>



<a name="231667592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231667592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231667592">(Mar 24 2021 at 16:45)</a>:</h4>
<p>Also, <code>r# foo</code> doesn't work in a macro, so it's available.</p>



<a name="231668117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668117">(Mar 24 2021 at 16:48)</a>:</h4>
<p>it seems <code>\</code> is available, <code>error: unknown start of token: \</code></p>



<a name="231668119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668119">(Mar 24 2021 at 16:48)</a>:</h4>
<p>Anything involving the backquote character (<code> ` </code>) is available.</p>



<a name="231668208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668208">(Mar 24 2021 at 16:49)</a>:</h4>
<p>(I think it may make sense to capture the result of this thread in a lang team design note, for future reference.)</p>



<a name="231668453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668453">(Mar 24 2021 at 16:50)</a>:</h4>
<p>I guess you can check for anything that ends up as <code>rustc_lexer::TokenKind::Unknown</code></p>



<a name="231668500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668500">(Mar 24 2021 at 16:51)</a>:</h4>
<p>which includes most Unicode, but I suppose we want to stick to ascii symbols</p>



<a name="231668560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668560">(Mar 24 2021 at 16:51)</a>:</h4>
<p>control plane symbols!</p>



<a name="231668597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668597">(Mar 24 2021 at 16:51)</a>:</h4>
<p>ok, <em>printable</em> ascii</p>



<a name="231668788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231668788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231668788">(Mar 24 2021 at 16:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="138448">cuviper</span> <a href="#narrow/stream/213817-t-lang/topic/Available.20syntax/near/231668597">said</a>:</p>
<blockquote>
<p>ok, <em>printable</em> ascii</p>
</blockquote>
<p>ACK to that. ;)</p>



<a name="231670122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231670122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231670122">(Mar 24 2021 at 17:00)</a>:</h4>
<p>I think that <code>$</code> followed by a non-identifier qualifies, though that'd be <em>extremely confusing</em> as an extension point for something other than macro syntax.</p>



<a name="231672769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231672769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231672769">(Mar 24 2021 at 17:14)</a>:</h4>
<p>Interestingly, <code>~</code> still seems to lex as a token, even though I don't think it's used in any existing syntax: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=01da90badd238a610417b72a0c4fa3d6">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=01da90badd238a610417b72a0c4fa3d6</a></p>



<a name="231673470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231673470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231673470">(Mar 24 2021 at 17:19)</a>:</h4>
<p>(It was removed from its meaning related to Box by <a href="https://github.com/rust-lang/rfcs/pull/59">https://github.com/rust-lang/rfcs/pull/59</a> .)</p>



<a name="231674977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/231674977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#231674977">(Mar 24 2021 at 17:28)</a>:</h4>
<p>another way to play with this is to use a broad <code>$($x:tt)*</code> in the play macro, then try different uses to see what tokenizes at all</p>



<a name="232461264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232461264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232461264">(Mar 30 2021 at 17:04)</a>:</h4>
<p>I would definitely like to reserve all </p>
<blockquote>
<p>\w+ <em>string</em></p>
</blockquote>
<p>for future use.  Or in general, most places where <code>a"asdf"</code> and <code>b"asdf"</code> tokenize differently when there's no whitespace.</p>



<a name="232466540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232466540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232466540">(Mar 30 2021 at 17:39)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> agreed, you opened the <code>k#foo</code> RFC, should we try to make a quick one for reserving the more general syntactic space?</p>



<a name="232468328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232468328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232468328">(Mar 30 2021 at 17:51)</a>:</h4>
<p>I'd be in favour.  I can probably write one of those on the weekend, dunno if that's soon enough.</p>



<a name="232469148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232469148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232469148">(Mar 30 2021 at 17:57)</a>:</h4>
<p>I'd be willing to write the RFC for reserving both <code>[a-z]+#</code> and <code>[a-z]+"</code>, and I can probably have it done by today. I don't know enough about how macros eat tokens to make the reference-level explanation very detailed, but other than that it shouldn't take me long I think</p>



<a name="232470166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470166">(Mar 30 2021 at 18:02)</a>:</h4>
<p>I'm curious if we should reserve <code>[a-z]["#]</code> or <code>[a-z]+["#]</code>. The latter is a <em>much</em> bigger syntax space.</p>



<a name="232470194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470194">(Mar 30 2021 at 18:03)</a>:</h4>
<p>I'm definitely in favor of the former, and I might be in favor of the latter but I'm unsure.</p>



<a name="232470436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470436">(Mar 30 2021 at 18:04)</a>:</h4>
<p>I think it's the latter because of <code>br"hello"</code></p>



<a name="232470458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470458">(Mar 30 2021 at 18:04)</a>:</h4>
<p>right, we can combine them arbitrarily</p>



<a name="232470492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470492">(Mar 30 2021 at 18:04)</a>:</h4>
<p>Ah! OK, convinced now.</p>



<a name="232470508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470508">(Mar 30 2021 at 18:04)</a>:</h4>
<p>I don't yet have an idea of the exact semantics of what <code>bf"{foo}"</code> might be, but it would be good to leave the option open</p>



<a name="232470565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470565">(Mar 30 2021 at 18:05)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> If that exists at all, it'd be "format this into a bytestring".</p>



<a name="232470729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470729">(Mar 30 2021 at 18:06)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> Feel free to copy from <a href="https://github.com/rust-lang/rfcs/pull/3098">https://github.com/rust-lang/rfcs/pull/3098</a>, if there's anything useful to you.</p>



<a name="232470779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470779">(Mar 30 2021 at 18:06)</a>:</h4>
<p>I intend to heavily :)</p>



<a name="232470949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470949">(Mar 30 2021 at 18:07)</a>:</h4>
<p><span class="user-mention silent" data-user-id="256342">bstrie</span> <a href="#narrow/stream/213817-t-lang/topic/Available.20syntax/near/232469148">said</a>:</p>
<blockquote>
<p>I'd be willing to write the RFC for reserving both <code>[a-z]+#</code> and <code>[a-z]+"</code>, and I can probably have it done by today. I don't know enough about how macros eat tokens to make the reference-level explanation very detailed, but other than that it shouldn't take me long I think</p>
</blockquote>
<p>I wuld be happy if you did that <span class="user-mention" data-user-id="256342">@bstrie</span></p>



<a name="232470964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232470964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232470964">(Mar 30 2021 at 18:07)</a>:</h4>
<p>I think we have pretty general consensus in favor of this</p>



<a name="232471025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232471025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232471025">(Mar 30 2021 at 18:08)</a>:</h4>
<p>you can pilfer a bit from <a href="https://github.com/rust-lang/rfcs/pull/3098">https://github.com/rust-lang/rfcs/pull/3098</a> in terms of "edition compatibility"</p>



<a name="232471036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232471036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232471036">(Mar 30 2021 at 18:08)</a>:</h4>
<p>but I also tend to think that's more of an implementation concern</p>



<a name="232471062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232471062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232471062">(Mar 30 2021 at 18:08)</a>:</h4>
<p>(at least in this case)</p>



<a name="232471108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232471108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232471108">(Mar 30 2021 at 18:08)</a>:</h4>
<p>Or something like <code>sr#"a"b"#</code> that gives a <code>String</code> would be another possible future that needs two <code>\w</code>s</p>



<a name="232471291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232471291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232471291">(Mar 30 2021 at 18:10)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> Nit: regular expression syntaxes vary enough that it isn't always clear what something like <code>\w</code> refers to. (Among other things, some regex syntaxes define it to include non-ASCII and some don't.)</p>



<a name="232471382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232471382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232471382">(Mar 30 2021 at 18:10)</a>:</h4>
<p>I think the point was that this is a raw string</p>



<a name="232685482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232685482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232685482">(Apr 01 2021 at 00:16)</a>:</h4>
<p>Any news on the reservation RFC, <span class="user-mention" data-user-id="256342">@bstrie</span>?  I'd be happy to make that one the edition-critical one, to allow more discussion time on 3098.</p>



<a name="232689600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232689600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232689600">(Apr 01 2021 at 01:10)</a>:</h4>
<p>I've got my draft, finishing it up now</p>



<a name="232702107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232702107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232702107">(Apr 01 2021 at 04:24)</a>:</h4>
<p>@scottmcm and anyone else, I've got the RFC draft for reserving this syntax up here: <a href="https://gist.github.com/bstrie/ba6713e14406072cea5bdba342bc4b87">https://gist.github.com/bstrie/ba6713e14406072cea5bdba342bc4b87</a> take a look and let me know what you think. if there are no pre-comments I'll formally submit it in the morning</p>



<a name="232702549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232702549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232702549">(Apr 01 2021 at 04:31)</a>:</h4>
<p>I like the reference to <code>__</code> lexical space in C++</p>



<a name="232702648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232702648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232702648">(Apr 01 2021 at 04:33)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> The non-ascii idents tracking issue is undergoing stabilization FCP right now, so you're definition of "identifier" is going to be out-dated mid-RFC.  <a href="https://github.com/rust-lang/rust/issues/55467#issuecomment-810433429">https://github.com/rust-lang/rust/issues/55467#issuecomment-810433429</a></p>



<a name="232702768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232702768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232702768">(Apr 01 2021 at 04:35)</a>:</h4>
<p>Hmm, <code>4#foo</code> is interesting.</p>



<a name="232702907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232702907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232702907">(Apr 01 2021 at 04:36)</a>:</h4>
<p>Reminds me of things like <code>17#11 == 10#18</code>, which I first saw in <a href="https://sites.google.com/site/steveyegge2/numbers-minilanguage">https://sites.google.com/site/steveyegge2/numbers-minilanguage</a></p>



<a name="232703105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232703105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232703105">(Apr 01 2021 at 04:40)</a>:</h4>
<p>or <code>hex#1D2.E</code> for hex float literals...</p>



<a name="232704236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232704236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232704236">(Apr 01 2021 at 04:57)</a>:</h4>
<p>I did mention the non-ascii thing in the unresolved questions; I'm pleasantly surprised to learn that non-ascii idents is no longer in feature limbo. it doesn't actually fundamentally change anything about the RFC if it includes Unicode idents or not</p>



<a name="232704371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232704371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232704371">(Apr 01 2021 at 04:58)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> , I was trying not to go wild with scope by extending this to numeric literals as well, but if you think there's a good use for it then I wouldn't mind expanding it to numeric literals. at the very least I'll include it in the alternatives</p>



<a name="232704583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232704583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232704583">(Apr 01 2021 at 05:01)</a>:</h4>
<p>Yeah, there's probably not an easy predefined lexical production to use for it, since <code>INTEGER_LITERAL</code> doesn't seem quite right.  Just sticking to <code>IDENTIFIER_OR_KEYWORD</code> is probably best.</p>



<a name="232704898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232704898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232704898">(Apr 01 2021 at 05:05)</a>:</h4>
<p>So <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span> to leaving <code>4#foo</code> and <code>foo#4</code> and <code>4#4</code> and <code>4_foo</code> to some future RFC to worry about when there's better motivation and scoping.</p>



<a name="232705104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232705104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232705104">(Apr 01 2021 at 05:08)</a>:</h4>
<p>(I was thinking that <em>maybe</em> someone might want <code>0"foo"</code> for null terminated strings, but that was the only thing I could think of)</p>



<a name="232705814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232705814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232705814">(Apr 01 2021 at 05:19)</a>:</h4>
<p>I think we could get away fine with <code>c"foo"</code> or <code>z"foo"</code> or similar for that.</p>



<a name="232706174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232706174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232706174">(Apr 01 2021 at 05:25)</a>:</h4>
<p>The identifier space sounds good to me too.</p>



<a name="232706230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232706230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232706230">(Apr 01 2021 at 05:26)</a>:</h4>
<p>Honestly, we don't need single letters. Null-terminated strings could be <code>nul"xyz"</code> if we want.</p>



<a name="232706256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232706256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232706256">(Apr 01 2021 at 05:27)</a>:</h4>
<p>Or <code>cstr"xyz"</code>.</p>



<a name="232706375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232706375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232706375">(Apr 01 2021 at 05:29)</a>:</h4>
<p>I think it would depend on how things combine, like supporting <code>zbr#"a"b"#</code>.  But we don't need to design this, since it's just a hypothetical anyway <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="232706607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232706607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232706607">(Apr 01 2021 at 05:32)</a>:</h4>
<p>right, reserve the space now, leave the bikeshedding for the future :)</p>



<a name="232828117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232828117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232828117">(Apr 01 2021 at 21:32)</a>:</h4>
<p>RFC filed: <a href="https://github.com/rust-lang/rfcs/pull/3101">https://github.com/rust-lang/rfcs/pull/3101</a> <span class="user-mention" data-user-id="125270">@scottmcm</span></p>



<a name="232829255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Available%20syntax/near/232829255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Available.20syntax.html#232829255">(Apr 01 2021 at 21:42)</a>:</h4>
<p>Might be worth posting to the <a class="stream" data-stream-id="268952" href="/#narrow/stream/268952-edition-2021">#edition 2021</a> stream too, since I expect they'll want to track it.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>